package cn.iocoder.yudao.module.member.api.jobView;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.module.member.api.job.dto.JobPageReqDTO;
import cn.iocoder.yudao.module.member.api.job.dto.JobRespDTO;
import cn.iocoder.yudao.module.member.api.jobView.dto.JobViewCreateReqDTO;
import cn.iocoder.yudao.module.member.dal.dataobject.jobView.JobViewDO;
import cn.iocoder.yudao.module.member.service.jobView.JobViewService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
 * 企业 API 实现类
 *
 * @author 芋道源码
 */
@Service
@Validated
public class JobViewApiImpl implements JobViewApi {
    @Resource
    private JobViewService jobViewService;
//    @Resource
//    private JobViewLockRedis jobViewLockRedis;

    public static final long NOTIFY_TIMEOUT_MILLIS = 5 * DateUtils.SECOND_MILLIS;
    @Override
    public Boolean saveJobView(JobViewCreateReqDTO jobViewCreateReqVO) {
//        long num = jobViewService.count(jobViewCreateReqVO.getJobId(), jobViewCreateReqVO.getStudentId());
//        if(num>0){
//            jobViewService.updateJobView(jobViewCreateReqVO);
//        }else{
            jobViewService.createJobView(jobViewCreateReqVO);
//        }
        return true;
    }

}
